Skip to main content

Databases

Relational

  • Data is stored in tables (like a spreadsheet)
  • Columns can reference columns in other tables to create relations between them
  • Queries (usually SQL) retrieve and update data from one or more of these tables
  • Popular options: PostgreSQL, MySQL, Microsoft SQL Server

Document

  • Data is stored as "documents" which contain a hierarchy of key-values
    • Simplest implementation: a folder of JSON files (a.k.a. flat-file database)
      • Not performant or flexible enough for real-world applications
  • Often easier to set up than a relational database
  • Generally uses denormalization instead of relations
  • Popular options: MongoDB, CouchDB